<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.io.*"%>
<html>
<head>
<title>Error JSP</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<%
	Object status_code = request.getAttribute("javax.servlet.error.status_code");
	Object message = request.getAttribute("javax.servlet.error.message");
	Object error_type = request.getAttribute("javax.servlet.error.exception_type");
	Throwable throwable = (Throwable) request.getAttribute("javax.servlet.error.exception");
	Object request_uri = request.getAttribute("javax.servlet.error.request_uri");
	
	out.println("<B>Status code:</B> " + status_code.toString());
	out.println("<BR><B>Message</B>: " + message.toString());
	out.println("<BR><B>Error type</B>: " + error_type.toString());
	out.println("<BR><B>Request URI</B>: " + request_uri.toString());
	out.println("<HR><PRE>");
	if (throwable != null) {
	  ByteArrayOutputStream ostr = new ByteArrayOutputStream(); 
	  throwable.printStackTrace(new PrintStream(ostr));
	  out.print(ostr); 
	}
%>
</body>
</html>
